/**
 * 
 */
package br.com.consultsystems.negocio.impl.financeiro;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.com.consultsystems.dominio.financeiro.Conta;
import br.com.consultsystems.negocio.spec.financeiro.ContaNegocio;
import br.com.consultsystems.persistencia.spec.financeiro.ContaPersistencia;

/**
 * @author Moralles
 *
 */
@Stateless(name = "contaNegocio")
public class ContaNegocioImpl implements ContaNegocio {

	@EJB
	private ContaPersistencia contaPersistencia;
	
	@Override
	public Conta merge(Conta t) throws Exception {
		return contaPersistencia.merge(t);
	}

	@Override
	public Conta retrieve(Long id) throws Exception {
		return null;
	}

	@Override
	public void remove(Conta t) throws Exception {
		t = this.merge(t);
		contaPersistencia.remove(t);
	}

	@Override
	public void refresh(Conta t) throws Exception {
		contaPersistencia.refresh(t);
	}

	@Override
	public List<Conta> retrieveAll() throws Exception {
		return contaPersistencia.retrieveAll();
	}

	@Override
	public List<Conta> retrieveByFilter(String nomeCondominio) throws Exception {
		return contaPersistencia.retrieveByFilter(nomeCondominio);			
	}

	@Override
	public List<Conta> retrieveByCondominio(Long idCondominio)
			throws Exception {
		return contaPersistencia.retrieveByCondominio(idCondominio);
	}

	
}
